package fr.upmc.i3s.upmcontact.contents;

import java.util.Date;

public class Incident extends Submitted {
	
	private static final long serialVersionUID = 4468818166123974214L;
	
	private int type;
	private int priority;
	private int status;
	
	public Incident() {
		super();
		this.type = -1;
		this.priority = -1;
		this.status = -1;
	}

	public Incident(String id, Date createdAt, Date updatedAt, 
						String description, String place, String photoPath, User signaledBy, 
							int type, int priority, int status) {
		super(id, createdAt, updatedAt, description, place, photoPath, signaledBy);
		this.type = -1;
		this.priority = -1;
		this.status = -1;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public int getPriority() {
		return priority;
	}

	public void setPriority(int priority) {
		this.priority = priority;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	@Override
	public int hashCode() {
		return super.hashCode();
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (!super.equals(obj))
			return false;
		if (getClass() != obj.getClass())
			return false;
		Incident other = (Incident) obj;
		if (priority != other.priority)
			return false;
		if (status != other.status)
			return false;
		if (type != other.type)
			return false;
		return true;
	}

	@Override
	public String toString() {
		return super.toString() + " Incident [type=" + type + ", priority=" + priority
				+ ", status=" + status + "]";
	}

}
